package week11;

public class PTA630603 {

	public static void main(String[] args) {
		public Integer push(Integer item) throws FullStackException  {
	    	if(item==null)
	    	return null;
	    	if(top==arrStack.length)
	    		throw new FullStackException();
	    	arrStack[top++]=item;
	    	return item;
	    }

	    public Integer pop() throws EmptyStackException {
	    	if(top==0)
	    		throw new EmptyStackException();
	    	top--;
	    	return arrStack[top];
	    }

	    public Integer peek() throws EmptyStackException{
	    	if(top==0)
	    		throw new EmptyStackException();
	    	return arrStack[top-1];
	    }
	}

}
